#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <graph.h>

#include "mouse.h"


void main()
	{
	int b, x, y;
	char buf[100];

/*
	if (!mouseInstalled())
		{
		fprintf(stderr, "Maus nicht installiert\n");
		exit(1);
		}
*/
	if (!_setvideomode(_MAXRESMODE))
		{
		fprintf(stderr, "Kein Grafikmodus\n");
		exit(1);
		}
	mouseCursorOn();
	while (!kbhit())
		{
		mouseRead(&b, &x, &y);
		sprintf(buf, "%d,%d,%d    ", b, x, y);
		_settextposition(1,1);
		_outtext(buf);
		}
	getch();
	mouseCursorOff();
	_setvideomode(_DEFAULTMODE);
	}
